package testGroovy;

import groovy.json.JsonSlurper
import groovy.json.JsonParserType

def JSON = '''
	{errorCode:555,errorMsg:'%E6%8A%B1%E6%AD%89%EF%BC%8C%E6%82%A8%E7%9A%84%E8%BD%A6%E6%9A%82%E6%97%B6%E6%97%A0%E6%B3%95%E7%BB%A7%E7%BB%AD%E6%8A%95%E4%BF%9D%EF%BC%8C%E8%AF%B7%E5%92%A8%E8%AF%A2%E5%AE%A2%E6%9C%8D%E3%80%82'}
''' 

def jsonParse = new JsonSlurper().with { it ->
	it.type = JsonParserType.LAX
	it.parseText(JSON)
}

println jsonParse.errorMsg 

def jsonParse1 = new JsonSlurper().with { it ->
	it.type = JsonParserType.LAX
	it.parse(JSON as char[])
}

println jsonParse1.errorMsg

a.b = 2
println a

private getA() {
	a = [:]
}